<#include "head.ftl"/>
<script type="text/javascript" src="/app.js"></script>
</head>
<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12">
			<ul class="nav nav-pills">
				<li>
					 <button class="btn btn-primary" data-toggle="modal" data-target="#myModal">登录/注册</button>
					 
					 <!-- 模态框（Modal） -->
					<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					    <div class="modal-dialog">
					        <div class="modal-content">
					            <div class="modal-header">
					                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					                    &times;
					                </button>
					            </div>
					            <form id="form_data">
					            <div class="modal-body form-group">
					               	<input type="text" id="email" name="email" class="form-control" placeholder="邮件" required><br>
					               	<input type="password" id="password" name="password" class="form-control" placeholder="密码" required><br>
					            </div>
					            <div class="modal-footer">
					                <button type="button" class="btn btn-primary" id="loginBtn">登录</button>
					                <button type="button" class="btn btn-primary" id="regBtn">注册</button>
					                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					            </div>
					            </form>
					        </div><!-- /.modal-content -->
					    </div><!-- /.modal -->
				</li>
				
				<li>
				<a href="/post">发布新帖子</a>
				</li>
				<li class="dropdown pull-right">
					 <a href="#" data-toggle="dropdown" class="dropdown-toggle">下拉<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="#">操作</a>
						</li>
						<li>
							 <a href="#">设置栏目</a>
						</li>
						<li>
							 <a href="#">更多设置</a>
						</li>
						<li class="divider">
						</li>
						<li>
							 <a href="#">分割线</a>
						</li>
					</ul>
				</li>
			</ul>
			<table id="table" class="table table-striped">
				<thead>
					<tr>
						<th>编号</th>
						<th>title</th>
						<th>content</th>
						<th>发表时间</th>
						<th>上次更新时间</th>
						<th>作者</th>
						<th>头像</th>
					</tr>
				</thead>
				<tbody>
				<#list posts as postVo>
					<tr>
						<td>${postVo.id}</td>
						<td><a href="/post/details/${postVo.id}/1">${postVo.title}</a></td>
						<td>${postVo.createTime?string("yyyy-MM-dd HH:mm:ss")}</td>
						<td>${postVo.lastUpdateTime?string("yyyy-MM-dd HH:mm:ss")}</td>
						<td>${postVo.nickName}</td>
						<td><img src="${postVo.headImg}" alt="${postVo.nickName}" height="20" width="20"/></td>
					</tr>
					</#list>
				</tbody>
			</table>
			<ul class="pagination">
				<li>
					 <a href="#">Prev</a>
				</li>
				<li>
					 <a href="#">1</a>
				</li>
				<li>
					 <a href="#">2</a>
				</li>
				<li>
					 <a href="#">3</a>
				</li>
				<li>
					 <a href="#">4</a>
				</li>
				<li>
					 <a href="#">5</a>
				</li>
				<li>
					 <a href="#">Next</a>
				</li>
			</ul>
		</div>
	</div>
</div>
<#include "footer.ftl"/>
</body>
</html>